<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    var str1 = "hello";
    var str3 = "hello";

    var str2 = new String("world");
    var str4 = new String("world");

    console.log(str1);
    console.log(typeof str1);
    console.log(str2);
    console.log(typeof str2);

    console.log(str1 === str3);

    // 任何两个对象都不相等
    console.log(str2 === str4);

    // 字符串，字符数据，也有索引和长度

    console.log(str1[0]);
    console.log(str1[1]);
    console.log(str1.length);
    console.log(str1.toUpperCase())
    
    console.log(str2[0]);
    console.log(str2[1]);
    console.log(str2.length);
    console.log(str2.toUpperCase())


</script>
</html>